#include <iostream>
#include "Log.hpp"
#include "Common.hpp"
#include "TcpServer.hpp"

using namespace LogModule;

void Usage(std::string proc)
{
    std::cout << "Usage: " << proc << " port" << std::endl;
}

int main(int argc, char const *argv[])
{
    // if(argc != 3)
    // {
    //     Usage(argv[0]); 
    //     exit(USAGE_ERR);
    // }

    uint16_t port = std::stoi(argv[1]);
    
    Enable_Console_Log_Strategy();
     
    std::unique_ptr<TcpServer> tsvr = std::make_unique<TcpServer>(port);

    tsvr->Init();
    tsvr->Run();

    return 0;
} 